from wxpita import *

f = SizedFrame [
    Button(label='One'),
    Button(label='Two'),
    Button(label='Three'),
    SizedPanel(sizerType='horizontal', style='border_raised') [
        Button(label='Four'),
        Button(label='Five'),
        Button(label='Six'),
    ],
    SizedPanel(sizerType='form') [
        StaticText(label='Name'),
        TextCtrl(size='200,-1', value='Feihong Hsu'),
        StaticText(label='Status'),
        Choice(name='chc', choices=['OK', 'Insane', 'Mental', 'Crazy']),
        StaticText(label='Checkin Date'),
        DatePickerCtrl(style='dp_dropdown'), 
    ],
    SizedPanel(sizerType='table', options={'rows':3, 'cols':2},
               style='border_raised') [
        Button(label='0, 0'),
        Button(label='0, 1'),
        Button(label='1, 0'),
        Button(label='1, 1'),
        Button(label='2, 0'),
        Button(label='2, 1'),
    ],
    SizedPanel(sizerType='grid',
               options={'rows':4, 'cols':2, 'hgap':50, 'vgap':2}) [
        Button(label='0, 0'),
        Button(label='0, 1'),
        Button(label='1, 0'),
        Button(label='1, 1'),
        Button(label='2, 0'),
        Button(label='2, 1'),
        Button(label='3, 0'),
        Button(label='3, 1'),
        Button(label='4, 0'),
        Button(label='4, 1'),
    ],
]

@f.Init
def _():
    f.chc.SetSelection(0)
    
    f.Fit()

f.Show('SizedFrame and SizedPanel Example')
